package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PowerController {

    @RequestMapping("/{page}.html")
    public String page( @PathVariable String page){
        return page;
    }
    @RequestMapping("/{path}/{page}.html")
    public String page(@PathVariable String path, @PathVariable String page){
        return path +"/"+page;
    }
    @RequestMapping("/{path1}/")
    public String IndexPage(@PathVariable String path1){
        return path1 +"/index";
    }
    @RequestMapping("/{path1}/{path2}")
    public String IndexPage(@PathVariable String path1, @PathVariable String path2){
        return path1 +"/"+path2+"/index";
    }
}
